﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HostTool.Core
{
   abstract class Board : IBoard
    {

       List<ICPU> listCPU = new List<ICPU>();

       HostMachine machine;

       public Board(HostMachine machine)
       {
           this.machine = machine;
       }

       protected void AddCPU(ICPU cpu)
       {
           listCPU.Add(cpu);
       }

     
        #region IBoard 成员

        public virtual string Name
        {
            get { return "---"; }
        }

        public virtual IList<ICPU> CPUS
        {
            get { return listCPU.AsReadOnly(); }
        }

        public virtual HostMachine Machine
        {
            get { return machine; }
        }

        public virtual void Start()
        {
            foreach(ICPU cpu in listCPU)
            {
                cpu.Start();
            }
        }

        public virtual void Stop()
        {
            foreach (ICPU cpu in listCPU)
            {
                
            }
        }

        #endregion
    }
}
